// file: 	cs-alt-me-graph.do
// purpose: create graph of marginal effect of constituency size, using
// 			alternative measures. Figure OA2.


use estimation_results_sen.dta, clear
append using estimation_results_bicam.dta
append using estimation_results.dta

replace predlncs= predlncsbicam if predlncs==. & predlncsbicam~=.
replace predlncs= predlncssen if predlncs==. & predlncssen~=.

twoway rarea lo95_2 up95_2 predlncs, sort  fcolor(gs8%15) lcolor(gs8%0) || ///
	line estimate2 predlncs , sort lcolor(black) || ///
	rarea lo95_2_b up95_2_b predlncs, sort  fcolor(maroon%15) lcolor(maroon%0) || ///
	line estimate2_b predlncs, sort lcolor(maroon) || ///
	rarea lo95_2_c up95_2_c predlncs, sort  fcolor(navy%15) lcolor(navy%0) || ///
	line estimate2_c predlncs, sort lcolor(navy) ///
	scheme(s1mono) plotregion(color(none)) ///
	legend(off) ytitle(Probability of Favorable Opinion ({it:y{subscript:i} {&gt} 2}), ///
	size(small) margin(small)) ///
	xtitle(Constituency Size (log), size(small) margin(small)) ///
	ylabel(.4(.1).9,angle(0) labgap(1.25) labsize(small)) ///
	xlabel(, labgap(1.25) labsize(small)) ///
	text(.785 -1.25 "{it:Lower chambers}", size(small) placement(e)) ///
	text(.7 -0.2 "{it:Both chambers}", size(small) placement(w) color(navy)) ///
	text(.68 2 "{it:Upper chambers}", size(small) placement(e) color(maroon))

graph export marginaleffect_altmeasures.pdf, replace
